package KaiSa;

import java.util.Scanner;
public class KaiSa {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        in.nextLine();
        while(num>0)
        {
            String a = in.nextLine();
            char b[] = a.toCharArray();
            for(int i = 0;i<a.length();i++)
            {
                if(b[i]<='W' && b[i]>='A' || b[i] <='w' && b[i]>='a')
                {
                    b[i]+=3;
                }
                else if (b[i] == 'Z')
                {
                    b[i] = 'A';
                }
                else if(b[i] == 'z')
                {
                    b[i] = 'a';
                }
            }
            System.out.println(b);
            num = num-1;
        }
    }


}
